{% extends "base.html" %}

{% block title %}| Rank Semanal{% endblock %}

{% block body %}

<center>
	<h2> <a href="/rank/"> Rank Geral </a> / <a href="/rank/raridade"> Rank por Raridade </a> / Rank Semanal <div style="font-size:0.5em">({{users.paginator.count}} membros)</div></h2>
</center>

<div class="pagination" align="center">
    <span class="step-links" >
        {% if users.has_previous %}
            <a href="?page=1"><<</a>
            <a href="?page={{ users.previous_page_number }}"><</a>
        {% endif %}

        <span class="current">
            {{ users.number }} de {{ users.paginator.num_pages }}
        </span>

        {% if users.has_next %}
            <a href="?page={{ users.next_page_number }}">></a>
            <a href="?page={{ users.paginator.num_pages }}">>></a>
        {% endif %}
		  <h5>{{ users.start_index }} - {{ users.end_index }}</h5>
			
    </span>
</div>

<table class="sortable" align="center">
        <tr height=35> 
                <th class="righttop"> Rank </th>
                <th align="center" > Nome </th>
                <th class="righttop"> <img src="../../media/level.png"> </th>
                <th align="center" width=100 > % </th>
                <th class="righttop"> <img src="../../media/platinum.png" height=20 >     </th>
                <th class="righttop"> <img src="../../media/gold.png" height=20>     </th>
                <th class="righttop"> <img src="../../media/silver.png" height=20>   </th>
                <th class="righttop"> <img src="../../media/bronze.png" height=20>   </th>
                <th class="righttop"> <img src="../../media/total.png" height=20 ></th>
                <th class="righttop"> Pontos   </th>
        </tr>
{% for rank, user_rank, dif in users.object_list %}
        <tr 
					{% ifequal user_rank.user.auth.username request.user.username %}
						style="background:#110011"
					{% endifequal  %} > 

                <td align="center">{{ rank }} </td>
					</td>
                <td align="left" style="border-right:0px">
                        <img class="meio" src="{{ user_rank.user.pic_url}}" height=20 />
                        <a href= "/rank/{{ user_rank.user.auth.username }}"> {{ user_rank.user.auth.username}} </a>
                </td>
                <td align="center">{{ user_rank.level }} </td>
                <td align="left"   style="border-right: 0px">
                           <div class="barslide" style="width: {{user_rank.perc_level}}px">
                                <div class="barbg"> {{ user_rank.perc_level }}% </div></div>
                </td>
         
                <td align="center">{{ user_rank.platinum}}</td>
                <td align="center">{{ user_rank.gold}}</td>
                <td align="center">{{ user_rank.silver}}</td>
                <td align="center">{{ user_rank.bronze}}</td>
                <td align="center">{{ user_rank.total }}</td>
                <td align="center">{{ user_rank.points }}</td>
        </tr>
{% endfor %}
</table>



<br/>
<div class="pagination" align="center">
    <span class="step-links" >
        {% if users.has_previous %}
            <a href="?page={{ users.previous_page_number }}"><</a>
        {% endif %}

        <span class="current">
            {{ users.number }} de {{ users.paginator.num_pages }}
        </span>

        {% if users.has_next %}
            <a href="?page={{ users.next_page_number }}">></a>
        {% endif %}
    </span>
</div>
<br/>
{% endblock %}
